<?php

namespace Yj\Crontab;


use Hyperf\Di\Annotation\Inject;

class CrontabStrategy
{
    /**
     * @Inject()
     * @var Executor
     */
    protected $executor;

    public function dispatch(Crontab $crontab)
    {
        co(function ()use($crontab){
            $this->executor->execute($crontab);
        });
    }
}